home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / vpcalc23.zip / N!.VPC < prev    next >
Text File  |  1991-09-08  |  575b  |  17 lines

  1. "Start of N!.VPC
  2.  
  3. x This VPCalc code file computes an approximation to N! for large N
  4. x To run, start VPCalc.Exe.  At Command: prompt, enter:
  5. x     ----->>>>>  Run("N!  <<<<<-----;
  6. x this will load the learned line below
  7. x Set N = a value and do the X command to execute the learned line
  8. " Will not overflow for N <= 1.70854,E+9,  Harry Smith, 90/01/07.
  9.  
  10. p Rem Put Pi on the List
  11. X If N < 0 WriteLn("Error in N") Else If N = 0 Then X = 1 Else +
  12.   X = (N+0.5) * Ln(N) - N + 0.5 * Ln(2*Pi) + 1/(12 * N);  X = Exp(X); +
  13.   X = Int(X)
  14. N = 69
  15.  
  16. Rem   End of N!.VPC
  17.